if (!("finalizeConstruction" in ViewPU.prototype)) {
    Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
}
export class EcLoading extends ViewPU {
    constructor(k33, l33, m33, n33 = -1, o33 = undefined, p33) {
        super(k33, m33, n33, p33);
        if (typeof o33 === "function") {
            this.paramsGenerator_ = o33;
        }
        this.__tip = new SynchedPropertySimpleOneWayPU(l33.tip, this, "tip");
        this.__icon = new SynchedPropertyObjectOneWayPU(l33.icon, this, "icon");
        this.wd = 65;
        this.ht = 20;
        this.__animate = new SynchedPropertySimpleOneWayPU(l33.animate, this, "animate");
        this.__angle = new ObservedPropertySimplePU(0, this, "angle");
        this.controller = undefined;
        this.setInitiallyProvidedValue(l33);
        this.finalizeConstruction();
    }
    setInitiallyProvidedValue(j33) {
        if (j33.tip === undefined) {
            this.__tip.set('正在加载中...');
        }
        if (j33.icon === undefined) {
            this.__icon.set({ "id": -1, "type": 20000, params: ['app.media.page_loading'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
        }
        if (j33.wd !== undefined) {
            this.wd = j33.wd;
        }
        if (j33.ht !== undefined) {
            this.ht = j33.ht;
        }
        if (j33.animate === undefined) {
            this.__animate.set(false);
        }
        if (j33.angle !== undefined) {
            this.angle = j33.angle;
        }
        if (j33.controller !== undefined) {
            this.controller = j33.controller;
        }
    }
    updateStateVars(i33) {
        this.__tip.reset(i33.tip);
        this.__icon.reset(i33.icon);
        this.__animate.reset(i33.animate);
    }
    purgeVariableDependenciesOnElmtId(h33) {
        this.__tip.purgeDependencyOnElmtId(h33);
        this.__icon.purgeDependencyOnElmtId(h33);
        this.__animate.purgeDependencyOnElmtId(h33);
        this.__angle.purgeDependencyOnElmtId(h33);
    }
    aboutToBeDeleted() {
        this.__tip.aboutToBeDeleted();
        this.__icon.aboutToBeDeleted();
        this.__animate.aboutToBeDeleted();
        this.__angle.aboutToBeDeleted();
        SubscriberManager.Get().delete(this.id__());
        this.aboutToBeDeletedInternal();
    }
    get tip() {
        return this.__tip.get();
    }
    set tip(g33) {
        this.__tip.set(g33);
    }
    get icon() {
        return this.__icon.get();
    }
    set icon(f33) {
        this.__icon.set(f33);
    }
    get animate() {
        return this.__animate.get();
    }
    set animate(e33) {
        this.__animate.set(e33);
    }
    get angle() {
        return this.__angle.get();
    }
    set angle(d33) {
        this.__angle.set(d33);
    }
    setController(c33) {
        this.controller = c33;
    }
    aboutToAppear() {
        this.animate && setTimeout(() => {
            this.angle = 360;
        });
    }
    initialRender() {
        this.observeComponentCreation2((z32, a33) => {
            Column.create();
            Column.width(160);
            Column.height(160);
            Column.justifyContent(FlexAlign.Center);
            Column.borderRadius(24);
            Column.backgroundColor('rgba(0,0,0,0.3)');
        }, Column);
        this.observeComponentCreation2((x32, y32) => {
            Image.create(this.icon);
            Context.animation({
                delay: 200,
                duration: 2000,
                iterations: -1,
                curve: Curve.FastOutSlowIn
            });
            Image.width(this.wd);
            Image.height(this.ht);
            Image.rotate({ angle: this.angle });
            Context.animation(null);
        }, Image);
        this.observeComponentCreation2((v32, w32) => {
            Text.create(this.tip);
            Text.fontSize({ "id": -1, "type": 10002, params: ['app.float.yk_module_title_font_size'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
            Text.fontColor('#fff');
            Text.fontWeight(500);
            Text.margin({ top: 18 });
        }, Text);
        Text.pop();
        Column.pop();
    }
    rerender() {
        this.updateDirtyElements();
    }
}
